<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="layout::head">
    <title>menus : View all</title>
</head>
<body>
<div th:replace="layout::navbar"></div>
<h1>menus : View all</h1>
<div class="container">
    <div class="pull-right">
        <a href="form.html" th:href="@{/(form)}">Create menu</a>
    </div>
    <table class="table table-bordered table-striped">
        <thead>
        <tr>
            <td>ID</td>
            <td>Name</td>
            <td>Url</td>
        </tr>
        </thead>
        <tbody>
        <tr th:if="${menus eq null}">
            <td colspan="3">No menus</td>
        </tr>
        <tr th:each="menu : ${menus}">
            <td><a href="view.html" th:href="@{'/' + ${menu.menuid}}" th:text="${menu.menuid}" >1</a></td>
            <td th:text="${menu.menuname}">菜单</td>
            <td th:text="${menu.menuurl}"> /menu</td>
        </tr>
        </tbody>
    </table>
</div>
</body>
</html>
